//
//  FPdirectorModel.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/21.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPdirectorModel.h"

@implementation FPdirectorModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

+ (FPdirectorModel *)directorModelWithDic:(NSDictionary *)dic
{
    FPdirectorModel *model = [[FPdirectorModel alloc]init];
    NSArray *typeArr = dic[@"types"];
    NSDictionary *dirDic  = typeArr[0];
    {
        NSArray *perdir = dirDic[@"persons"];
        NSDictionary *dirppp = perdir[0];
        model.directorImage = dirppp[@"image"];
        model.directorName = dirppp[@"name"];
        model.directorEn = dirppp[@"nameEn"];
        
    }
    NSDictionary *actdic = typeArr[1];
    {
        NSArray *actrr = actdic[@"persons"];
        NSDictionary *act1dic = actrr[0];
        {
            model.actor1Name = act1dic[@"name"];
            model.actor1Image = act1dic[@"image"];
            model.personate1Name = act1dic[@"personateCn"];
            model.actor1Roleimage = act1dic[@"roleCover"];
            NSLog(@"%@",model.actor1Roleimage);
        }
        NSDictionary *act2dic = actrr[1];
        {
            model.actor2Name = act2dic[@"name"];
            model.actor2Image = act2dic[@"image"];
            model.personate2Name = act2dic[@"personateCn"];
            model.actor2Roleimage = act2dic[@"roleCover"];
            NSLog(@"%@",model.actor2Roleimage);


        }
        NSDictionary *act3dic = actrr[2];
        {
            model.actor3Name = act3dic[@"name"];
            model.actor3Image = act3dic[@"image"];
            model.personate3Name = act3dic[@"personateCn"];
            model.actor3Roleimage = act1dic[@"roleCover"];

        }
        NSDictionary *act4dic = actrr[3];
        {
            model.actor4Name = act4dic[@"name"];
            model.actor4Image = act4dic[@"image"];
            model.personate4Name = act4dic[@"personateCn"];
            model.actor4Roleimage = act1dic[@"roleCover"];

        }
    }
    NSDictionary *writerdic = typeArr[2];
    {

        NSArray *writeArr = writerdic[@"persons"];
        NSDictionary *write1Dic = writeArr[0];
        
            model.writer1Name = write1Dic[@"name"];
            NSLog(@"%@",model.writer1Name);
        
        
    }
    NSDictionary *productdic = typeArr[3];
    {
        NSArray *productArr = productdic[@"persons"];
        NSDictionary *product1Dic = productArr[0];
        {
            model.produced1Name = product1Dic[@"name"];
            model.producedNameEN = product1Dic[@"nameEn"];
        }
     }
    return model;
    
}
@end
